<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title></title>
		<link rel="stylesheet" href="css/mui.min.css" />
		<link rel="stylesheet" href="css/app.css" />
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title">列表</h1>
		</header>
		<div class="mui-content">
			<ul id="list" class="mui-table-view">
			
			</ul>
		</div>
		
		<script src="js/mui.js" type="text/javascript" charset="utf-8"></script>
		<script src="libs/request-1.js" type="text/javascript" charset="utf-8"></script>
		<script src="libs/common.js" type="text/javascript" charset="utf-8"></script>
		<script>
			mui.plusReady(function () {
			    main()
			})
			main()
			function main () {
				list()
			}
			function list () {
				get(Api.index.list).then(res=>{
					let s = ''
					let data = res.rows
					mui.each(data,function (index,element) {
						s+=`	<li class="mui-table-view-cell mui-media" id="${element.id}">
				<a href="javascript:;">
					<img class="mui-media-object mui-pull-left" src="${baseUrl+element.cover}">
					<div class="mui-media-body">
						<h4>${element.title}</h4>
						<p class="mui-ellipsis">${element.title}</p>
					</div>
				</a>
			</li>`
					})
					document.getElementById("list").innerHTML=s
					
					getSubAll('#list','list-detail','li',true,'id')
				})
			}
		</script>
	</body>
</html>